<?php
/*class controller for pet page
 *
 */
class PetPage extends Controller {

        //function __construct()
        function PetPage()
        {
                parent::Controller();
        }

        function index()
        {
         //create data array
         $data = array();

         $this->load->model('PetPage');

         $this->load->view('PetPage', $data);

         //set up a validation form
                if (isset($_POST['petpage']))
                {
                        //Validate and Prep the inquiry form
                        $this->load->library('form_validation');
                        $this->form_validation->set_rules('name', 'name', 'required|trim|strtolower');
                        $this->form_validation->set_rules('email', 'email', 'required|trim');
                        $this->form_validation->set_rules('comments', 'comments', 'required|trim');


                        $result = $this->form_validation->run();

                        if ($result === TRUE)
                        {
                        
                        echo "Thank you for your inquiring about one of our pets.";
        
                }
        }
}
}
?>